
package com.sxkj.service.sys;

import com.github.pagehelper.PageInfo;
import com.sxkj.entity.entity.sys.Attachment;
import com.sxkj.entity.mapper.sys.AttachmentMapper;
import com.sxkj.service.base.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * @author daixiaowei
 *
 * @description: 附件
 * @date 2019-12-25 10:22:04
 */
@Service
public class AttachmentService extends BaseService<AttachmentMapper,Attachment> {


	/**
	* 获取单条数据
	* @param id
	* @return Attachment
	*/
	public Attachment get(String id) throws Exception{
		return super.get(id);
	}
	
	/**
	* 获取单条数据
	* @param attachment
	* @return Attachment
	*/
	public Attachment get(Attachment attachment) throws Exception{
		return super.get(attachment);
	}
	
	/**
	* 查询列表数据
	* @param attachment
	* @return List<Attachment>
	*/
	public List<Attachment> findList(Attachment attachment) throws Exception{
		return super.findList(attachment);
	}

	/**
	* 查询分页数据
	* @param attachment
	* @param pageSize
	* @param pageNum
	* @return Page
	*/
	public PageInfo findPage(Attachment attachment, Integer pageSize, Integer pageNum) throws Exception{
		return super.findPage(attachment, pageSize, pageNum);
	}

	/**
	* 保存数据（插入或更新）
	* @param attachment
	*/
	@Transactional(rollbackFor = Exception.class)
	public void save(Attachment attachment) throws Exception{
		super.save(attachment);
	}

	/**
	* 删除数据
	* @param attachment
	*/
	@Transactional(rollbackFor = Exception.class)
	public void delete(Attachment attachment) throws Exception{
		super.delete(attachment);
	}



	public List<Attachment> selectList(Attachment attachment) {
		return baseMapper.selectList(attachment);
	}
}